﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BOSS.Framework.Search.UrlBuilder;

namespace BOSS.Framework.Search.Context
{
    /// <summary>
    /// 字符串过滤条件类
    /// </summary>
    [Serializable]
    public class TermStringFilterPart : TermValueFilterPart<string>
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="fieldName"></param>
        /// <param name="value"></param>
        public TermStringFilterPart(string fieldName, string value)
        {
            this.FieldName = fieldName;
            this.Value = value;
        }

        /// <summary>
        /// 构造 URL
        /// </summary>
        /// <param name="urlBuilder"></param>
        public override void BuildUrl(IUrlBuilder urlBuilder)
        {
            urlBuilder.SetFilter(this.FieldName, this.Value);
        }
    }
}
